<#include
        "../../common/com.html"  /> <@layout>
<head>
    <link rel="stylesheet" type="text/css" href="${ctx}/static/cbb/artDialog/skins/blue.css">
    <script src="${ctx}/static/cbb/artDialog/jquery.artDialog.js"></script>
</head>
    <script type="text/javascript">
    //open new window
    function newModels(){
        var url = '${ctx}/dmCjgl/newModes' ;
        initArtDialog({url:url, title:'新增', width:650, height:450,lock:true,background: '#EAEAEA'});
    }

  /**
     * 删除选中的模型信息
     */
    function dels(obj,yxbz){
            var url = '${ctx}/dmCjgl/delete/';
            $("#id").attr("value",obj);
            $('#myform').form('submit', {
                url : url,
                onSubmit : function() {
                },
                success : function(data) {
                    // 回填页面
                    alert(data);
                    window.location.reload();
                }
            });
    }

</script>
<body>

<div class="page-content">
	 <div class="row-fluid">
        <div class="span12">
            <form class="form-inline" id="myform">
                <input type="hidden" name="id" id="id">
              
             <!--    <button id="search_btn" onclick="return false;" class="btn btn-info btn-small"  onclick="queryModel()">
                    <i class="icon-key bigger-110"></i>
                    查询
                </button>
                <a href="#"  class="btn btn-danger btn-small bigger-110"   onclick="cleankhid();">取消 </a>
 -->
            </form>
            <!-- PAGE CONTENT BEGINS -->
		      		  <div class="row-fluid">
										<div class="table-header"  style="width:auto">
											<input id="#modal-form" type='button' onclick='adds()'  class='btn btn-mini btn-danger' value='新增'> 
										</div>
										<table id="sample-table" class="table table-striped table-bordered table-hover table-condensed">
										</table>
								</div>

            <!-- PAGE CONTENT ENDS -->
        </div><!-- /.span -->
    </div><!-- /.row-fluid -->
</div><!-- /.page-content -->



<#include  "../../common/end.html"  /> 
<script>
     function adds(){
        var url = '${ctx}/dmCjgl/newModes' ;
        window.location.href=url;
  //      initArtDialog({url:url, title:'新增', width:600, height:400,lock:true,background: '#EAEAEA'});
    }
    /**
     * 编辑选中的模型信息
     */
    function edits(obj){
        var rowData = $("#grid-table").getRowData(obj);
        var  url = '${ctx}/dmCjgl/newModes?id=' + rowData.id;
        initArtDialog({url:url, title:'修改', width:730, height:330,lock:true,background: '#EAEAEA'});
    }
    
</script>
<script type="text/javascript">
jQuery(function($) {
	var oTable1 = $('#sample-table').dataTable( {
		"bStateSave": false, //保存状态到cookie ******很重要 ， 当搜索的时候页面一刷新会导致搜索的消失。使用这个属性设置为true就可避免了 
		"bPaginate": true, // 是否使用分页
		"bServerSide":true,
		"searching": false,  
		"sScrollX":"100%", 
		"bProcessing": false, //是否显示正在处理的提示 
		   "iDisplayLength": 20, //默认每页显示的记录数
	        "aoColumns": [
	            { "mData": "id" ,
	            	 "sTitle" : "用户名"},
	            	  { "mData": "id" ,
		            	 "sTitle" : "用户名"},
		            	  { "mData": "id" ,
			            	 "sTitle" : "用户名"},
			            	  { "mData": "id" ,
				            	 "sTitle" : "用户名"},
				            	  { "mData": "id" ,
					            	 "sTitle" : "用户名"},
					            	  { "mData": "id" ,
						            	 "sTitle" : "用户名"}
	        ],
	        "bAutoWidth": true, //列的宽度会根据table的宽度自适应 
	        "bSort": false, //是否使用排序 
	        "sAjaxSource": "${ctx}/dmCjgl/query",
	        "oLanguage": { //国际化配置  
                "sProcessing" : "正在获取数据，请稍后...",    
                "sLengthMenu" : "显示 _MENU_ 条",    
                "sZeroRecords" : "没有您要搜索的内容",    
                "sInfo": "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
                "sEmptyTable": "表中无数据存在！",
                "sInfoFiltered": "数据表中共为 _MAX_ 条记录",
                "sInfoPostFix" : "",    
                "sSearch" : "",    
                "sUrl" : "",    
                "oPaginate": {    
                    "sFirst": "首页",
                    "sPrevious" : "上一页",    
                    "sNext" : "下一页",    
                    "sLast": "末页"
                    }  }
	} );

})

</script>

</body>
 </@layout> 
